home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
An Invitation to the Roland World of Music
/
Roland - An Invitation To The Roland World Of Music.bin
/
vb
/
cooltool
/
sysex
/
sysex.bas
< prev
next >
Wrap
BASIC Source File
|
1995-04-20
|
1KB
|
45 lines
Option Explicit
Global Const MODAL = 1
Sub MIDIInOpen ()
Dim wRtn As Integer
If FormSysex.MIDIInput1.State >= MIDISTATE_OPEN Then
' Close midiin port
FormSysex.MIDIInput1.Action = MIDIIN_CLOSE
'Turn off the MIDI Filtering
FormSysex.MIDIInput1.Filter(FILTER_F9) = False
FormSysex.MIDIInput1.Filter(FILTER_ACTIVE_SENSE) = False
FormSysex.MIDIInput1.Filter(FILTER_CLOCK) = False
End If
' Get selected device id
FormSysex.MIDIInput1.DeviceID = MIDISetupForm.ComboMidiIn.ListIndex
' Open midi in
FormSysex.MIDIInput1.Action = MIDIIN_OPEN
'Turn on some MIDI Filtering
FormSysex.MIDIInput1.Filter(FILTER_F9) = True
FormSysex.MIDIInput1.Filter(FILTER_ACTIVE_SENSE) = True
FormSysex.MIDIInput1.Filter(FILTER_CLOCK) = True
End Sub
Sub MIDIOutOpen ()
If FormSysex.MIDIOutput1.State >= MIDISTATE_OPEN Or FormSysex.MIDIOutput1.DeviceID = -1 Then
' Close
FormSysex.MIDIOutput1.Action = MIDIOUT_CLOSE
End If
' Open selected device
FormSysex.MIDIOutput1.DeviceID = MIDISetupForm.ComboMidiOut.ListIndex - 1
FormSysex.MIDIOutput1.Action = MIDIOUT_OPEN
End Sub